package com.xl98.entity;

public class ResultFactory {
    public static Result buildSuccessResult(Object data) {
        return buidResult(ResponseCode.SUCCESS_CODE, ResponseCode.SUCCESS_MESSAGE, data);
    }

    public static Result buildFailResult(String message) {
        return buidResult(ResponseCode.FAIL_CODE, message, null);
    }
    public static Result buidResult(int resultCode, String message, Object data) {
        return new Result(resultCode, message, data);
    }
}
